#加载所有普通角色到chaData.infos
func loadChara(folder = "charas", specType = sys.CharaType.NORMAL):
	var dirStr = sys.getBasePath() + "/" + folder
	var dir = Directory.new()
	dir.open(dirStr)
	dir.list_dir_begin(true, true)
	var file = File.new()
	var dname = dir.get_next()
	while dname != "":
		#charas一级文件夹
		if dir.current_is_dir() and dname != "." and dname != "..":
			#二级文件夹
			var type = specType
			if dname == "ex":
				type = sys.CharaType.SPEC
			elif dname == "summ":
				type = sys.CharaType.SUMM

			var dirStr2 = dirStr + "/" + dname
			var dir2 = Directory.new()
			dir2.open(dirStr2)
			dir2.list_dir_begin(true, true)
			var dname2 = dir2.get_next()
			var arrs = []
			while dname2 != "":
				if dir2.current_is_dir():
					if not file.file_exists("%s/%s/%s.gd" % [dirStr2, dname2, dname2]):
						dname2 = dir2.get_next()
						continue
					arrs.append({"name":dname2, "dir":dirStr2})
				dname2 = dir2.get_next()
			if not arrs.empty():
				chaData.loadInfoF(arrs, type)
			dir2.list_dir_end()
		dname = dir.get_next()
	dir.list_dir_end()

#加载所有装备
func loadItems():
	var dirStr = sys.getBasePath() + "/items"
	var dir = Directory.new()
	dir.open(dirStr)
	dir.list_dir_begin(true, true)
	var file = File.new()
	var dname = dir.get_next()
	while dname != "":
		if dir.current_is_dir():
			if not file.file_exists("%s/%s/%s.gd" % [dirStr, dname, dname]):
				dname = dir.get_next()
				continue
			itemData.loadInfo(dname, dirStr)
		dname = dir.get_next()
	dir.list_dir_end()

	for i in itemData.infos:
		if i.hide == false:
			itemData.rndPoolRsl.append(i.id)

#加载所有天赋
func loadTalents():
	var dirStr = sys.getBasePath() + "/talents"
	var dir = Directory.new()
	dir.open(dirStr)
	dir.list_dir_begin(true, true)
	var file = File.new()
	var dname = dir.get_next()
	while dname != "":
		if dir.current_is_dir():
			if not file.file_exists("%s/%s/%s.gd" % [dirStr, dname, dname]):
				dname = dir.get_next()
				continue
			talentData.loadI(dname, dirStr)
		dname = dir.get_next()
	dir.list_dir_end()
